home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.4 KB | 41 lines | [TEXT/GEOL] |
- Item 5709739 21-Jan-91 07:33PST
-
- From: DAWSON.M Dawson, Mark
-
- To: LALEKERMAC CSX Technology, W Laleker,SSF,PAS
- MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: Re: TTEView text lines problem
-
- >I am trying to stuff text into a TTEView from an array of strings. Each
- > string in the array is to be a separate line in the view.
- >
- >I have tried embedding carriage returns in the text handle and installing it
- >in the view and the trouble is that only the first string is visible until I
- >type a character in the view. At that point the other lines become visible.
- >
- >Before I go beating down many other paths, could someone give me a hint?
-
- Lori,
- I've run across this problem, and here's my solution (I'm doing this inside
- of my TDTextDocument:AppendText(Str255 text) routine):
-
- ..
- fTEView->Focus();
- TESetSelect(32767,32767,fTEView->fHTE);
- ...
- TEInsert((Ptr)&text[1],len,fTEView->fHTE);
- ..
- fTEView->SynchView(TRUE);
- fTEView->DrawContents();
- ...
- If I leave out any of these steps, the text insertion doesn't appear (until I
- add more text via typing it in). It seems a little like black magic--I played
- around with every updating routine I could think of before I came across the
- above formula. Hope this helps,
-
- Mark
-
-